require_relative './fluent_attrs'

class Answer
  extend FluentAttrs

  attr_reader :question, :text, :next_question_id

  attrs klass: nil, 
        item: nil, 
        spell: nil,
        at: 0,
        df: 0,
        ap: 0,
        dp: 0,
        mp: 0,
        mv: 0,
        mr: 0,
        exp: 0,
        gold: 0,
        capacity: 0,
        mercenary: nil

  def initialize(question, text)
    @question = question
    @text = text
  end

  def next_question(question_id)
    @next_question_id = question_id
  end

  def leaf?
    !@next_question_id
  end
end
